<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="holidays">

<xsl:comment>
0 - have just been created
1 - is public
2 - have been denyed authorization
3 - is waiting for authorization
</xsl:comment>

	<table class="body" border="0" cellspacing="0" cellpadding="10">
	<tr><td colspan="3"><a href="/holidays/holidayCreate.aspx">Crea vacanza</a></td></tr>
	<tr height="20px"><td colspan="3"></td></tr>
	<xsl:for-each select="holiday">
	<tr><td style="border-right: 1px dotted black;"><b><xsl:value-of select="@title"/></b><br/>
		descrizione: <xsl:value-of select="@descr"/></td>
		<td width="30%" style="border-right: 1px dotted black;">
		<xsl:choose>
			<xsl:when test="@public=0">
				<a href="/holidays/myHolidays.aspx?holidayId={@holidayId}&amp;makeItPublic=3">Rendila<br/>pubblica!</a>
			</xsl:when>
			<xsl:when test="@public=1">
				<a style="color:Blue;" href="/holidays/myHolidays.aspx?holidayId={@holidayId}&amp;makeItPublic=0">Rendila<br/>privata!</a>
			</xsl:when>
			<xsl:when test="@public=3">
				In attesa di<br/>approvazione!
			</xsl:when>
			<xsl:when test="@public=2">
				Approvazione<br/>negata!<p/>
				<a style="color:Blue;" href="?holidayId={@holidayId}&amp;deleteIt=1"><img border="0" src="/imgs/delete.gif"/>&#160;Elimina la vacanza!</a>
			</xsl:when>
		</xsl:choose>
		</td>
		<td width="30%" style="border-right: 1px dotted black;">
			<a href="/holidays/holidayEdit.aspx?holidayId={@holidayId}"><img border="0" src="/imgs/modify.gif"/>&#160;Modifica vacanza</a>
		</td>
	</tr>
	<tr><td style="border-bottom: 1px dotted black;border-right: 1px dotted black;" >
		Si parte il <xsl:value-of select="@startGG"/>/<xsl:value-of select="@startMM"/>/<xsl:value-of select="@startYear"/> si torna il <xsl:value-of select="@endGG"/>/<xsl:value-of select="@endMM"/>/<xsl:value-of select="@endYear"/>
		<br/>Destinazione: <xsl:value-of select="@destination"/></td>
		<td style="border-bottom: 1px dotted black;border-right: 1px dotted black;">&#160;</td>
		<td style="border-bottom: 1px dotted black;border-right: 1px dotted black;">&#160;</td>
	</tr>
	</xsl:for-each>
	</table>
</xsl:template>

</xsl:stylesheet>